<template>
	<view id="template">
		
		
		<view style="width: 90%; margin: 20rpx auto; text-align: center; color: #888888;">
			<view style="margin: 15rpx auto; color: #000000; font-size: 40rpx;" class="blod">{{text.articleTitle}}</view>
			<view>撰稿人：{{text.articleAuthor}}</view>
			<view>发布时间：{{ this.$utiltg.dateDiff(text.createTime)}}</view>
			<view></view>
		</view>
		<image :src="text.articleImg" style=" border-radius: 15rpx; display: block; margin: 20rpx auto; width: 600rpx; height: 200rpx;"></image>
		<view style="width: 90%; margin: 0 auto;">
			<rich-text style="width: 100%; height: 100vh; margin: 0 auto;" :nodes="text.articleContent"></rich-text>
		</view>
	</view>
</template>
<script>
	export default { 
		data() {
			return {
				text:''
			}
		},
		async onLoad(e) {
			var id = e.id
			console.log(id)
			var text = await this.$api.articleContent({
				id
			});
			console.log(text.data)
			this.text = text.data
			uni.setNavigationBarTitle({
			title: text.data.articleTitle
			})
		},
		methods: { 

		},
		mounted() {}
	}
</script>
<style scoped>

</style>